package com.bt.lms.ui.action.school_education.stu_msg_manage;

import com.bt.lms.ui.page.school_education.graduat.PageEmployment;
import com.bt.lms.ui.page.school_education.stu_mes_manage.PageStudentMesManage;
import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;

/**
 *
 * 毕/结业信息按钮事件
 */
public class GraduateMesAction implements EventHandler {
    private final PageStudentMesManage pageStudentMesManage;

    public GraduateMesAction(PageStudentMesManage pageStudentMesManage) {
        this.pageStudentMesManage = pageStudentMesManage;
    }

    @Override
    public void handle(Event event) {

        //获取里边有几个盒子
        ObservableList<Node> children = pageStudentMesManage.getChildren();

        HBox hBox = (HBox) children.get(0);
        ObservableList<Node> hBoxChildren = hBox.getChildren();
        hBoxChildren.remove(3);
        Label label = new Label(">毕/结业信息");
        hBoxChildren.add(label);

        PageEmployment pageEmploymentGraduateMes = new PageEmployment();
        children.set(2, pageEmploymentGraduateMes);

    }
}
